package com.woniu.order.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 分销商订单详情表
 * @TableName zf_traderdetails
 */
@TableName(value ="zf_traderdetails")
@Data
public class ZfTraderdetails implements Serializable {
    /**
     * 订单id，主键自增
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 订单编号，唯一约束
     */
    private String code;

    /**
     * 分销商名称
     */
    private String distributorName;

    /**
     * 分销商联系方式
     */
    private String distributorPhone;

    /**
     * 分销商联系人
     */
    private String distributorContact;

    /**
     * 订单签订日期
     */
    private String orderDate;

    /**
     * 销售订单编号
     */
    private String salesOrderCode;

    /**
     * 销售负责人
     */
    private String salesManager;

    /**
     * 所有产品名称
     */
    private String allProductNames;

    /**
     * 总原价
     */
    private BigDecimal totalOriginalPrice;

    /**
     * 优惠金额
     */
    private BigDecimal discountAmount;

    /**
     * 订单申请人
     */
    private String orderApplicant;

    /**
     * 订单状态（0：已审批，1：已完成，2：已发货，3：已删除）
     */
    private Integer orderStatus;

    /**
     * 创建人
     */
    private String createdBy;

    /**
     * 创建时间
     */
    private Date createdAt;

    /**
     * 修改人
     */
    private String updatedBy;

    /**
     * 修改时间
     */
    private Date updatedAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ZfTraderdetails other = (ZfTraderdetails) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getDistributorName() == null ? other.getDistributorName() == null : this.getDistributorName().equals(other.getDistributorName()))
            && (this.getDistributorPhone() == null ? other.getDistributorPhone() == null : this.getDistributorPhone().equals(other.getDistributorPhone()))
            && (this.getDistributorContact() == null ? other.getDistributorContact() == null : this.getDistributorContact().equals(other.getDistributorContact()))
            && (this.getOrderDate() == null ? other.getOrderDate() == null : this.getOrderDate().equals(other.getOrderDate()))
            && (this.getSalesOrderCode() == null ? other.getSalesOrderCode() == null : this.getSalesOrderCode().equals(other.getSalesOrderCode()))
            && (this.getSalesManager() == null ? other.getSalesManager() == null : this.getSalesManager().equals(other.getSalesManager()))
            && (this.getAllProductNames() == null ? other.getAllProductNames() == null : this.getAllProductNames().equals(other.getAllProductNames()))
            && (this.getTotalOriginalPrice() == null ? other.getTotalOriginalPrice() == null : this.getTotalOriginalPrice().equals(other.getTotalOriginalPrice()))
            && (this.getDiscountAmount() == null ? other.getDiscountAmount() == null : this.getDiscountAmount().equals(other.getDiscountAmount()))
            && (this.getOrderApplicant() == null ? other.getOrderApplicant() == null : this.getOrderApplicant().equals(other.getOrderApplicant()))
            && (this.getOrderStatus() == null ? other.getOrderStatus() == null : this.getOrderStatus().equals(other.getOrderStatus()))
            && (this.getCreatedBy() == null ? other.getCreatedBy() == null : this.getCreatedBy().equals(other.getCreatedBy()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
            && (this.getUpdatedBy() == null ? other.getUpdatedBy() == null : this.getUpdatedBy().equals(other.getUpdatedBy()))
            && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getDistributorName() == null) ? 0 : getDistributorName().hashCode());
        result = prime * result + ((getDistributorPhone() == null) ? 0 : getDistributorPhone().hashCode());
        result = prime * result + ((getDistributorContact() == null) ? 0 : getDistributorContact().hashCode());
        result = prime * result + ((getOrderDate() == null) ? 0 : getOrderDate().hashCode());
        result = prime * result + ((getSalesOrderCode() == null) ? 0 : getSalesOrderCode().hashCode());
        result = prime * result + ((getSalesManager() == null) ? 0 : getSalesManager().hashCode());
        result = prime * result + ((getAllProductNames() == null) ? 0 : getAllProductNames().hashCode());
        result = prime * result + ((getTotalOriginalPrice() == null) ? 0 : getTotalOriginalPrice().hashCode());
        result = prime * result + ((getDiscountAmount() == null) ? 0 : getDiscountAmount().hashCode());
        result = prime * result + ((getOrderApplicant() == null) ? 0 : getOrderApplicant().hashCode());
        result = prime * result + ((getOrderStatus() == null) ? 0 : getOrderStatus().hashCode());
        result = prime * result + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        result = prime * result + ((getUpdatedBy() == null) ? 0 : getUpdatedBy().hashCode());
        result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", code=").append(code);
        sb.append(", distributorName=").append(distributorName);
        sb.append(", distributorPhone=").append(distributorPhone);
        sb.append(", distributorContact=").append(distributorContact);
        sb.append(", orderDate=").append(orderDate);
        sb.append(", salesOrderCode=").append(salesOrderCode);
        sb.append(", salesManager=").append(salesManager);
        sb.append(", allProductNames=").append(allProductNames);
        sb.append(", totalOriginalPrice=").append(totalOriginalPrice);
        sb.append(", discountAmount=").append(discountAmount);
        sb.append(", orderApplicant=").append(orderApplicant);
        sb.append(", orderStatus=").append(orderStatus);
        sb.append(", createdBy=").append(createdBy);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", updatedBy=").append(updatedBy);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}